﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Main.Master" AutoEventWireup="true"
    CodeBehind="CatalogManage.aspx.cs" Inherits="ATW.MT.BaseManage.CatalogManage" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cp01" runat="server">
    <div class="main_hd">
        <h2 style="padding: 0px 20px;">
            类别管理
        </h2>
        <div class="title_tab" id="topTab">
            <ul>
                <li>类别名称：&nbsp;<input type="text" id="txtDiName" runat="server" style="text-indent: 0px" />&nbsp;&nbsp;
                    状态：&nbsp;
                    <asp:DropDownList runat="server" ID="ddlStatus" Width="100px">
                        <asp:ListItem Text="全部" Value=""></asp:ListItem>
                        <asp:ListItem Text="正常" Value="1"></asp:ListItem>
                        <asp:ListItem Text="删除" Value="2"></asp:ListItem>
                    </asp:DropDownList>
                    &nbsp; &nbsp; &nbsp;
                    <asp:Button runat="server" ID="btnSearch" Text="搜索" class="MaintenanceButton" OnClick="btnSearch_Click"
                        Style="background: #d91913; outline: none; border: none; color: White; padding: 5px 20px;
                        text-indent: 0px;" />
                    &nbsp; &nbsp; &nbsp;
                    <input type="button" id="btnAddItem" style="width: 68px; text-indent: 0px;" class="queryButton"
                        value="新增" />
                </li>
            </ul>
            <ul>
                <li>
                    <asp:Label runat="server" ID="lblError" ForeColor="Red" Font-Bold="true"></asp:Label></li>
            </ul>
        </div>
        <asp:Repeater ID="rpList" runat="server">
            <HeaderTemplate>
                <table width="95%" border="0" cellpadding="0" cellspacing="0" style="font-size: 14px"
                    class="queryResultTable">
                    <tr>
                        <th>
                            类别名称
                        </th>
                        <th>
                            类别描述
                        </th>
                        <th>
                            类别图片
                        </th>
                        <th>
                            类别子项
                        </th>
                        <th>
                            C级子项指定供应商
                        </th>
                        <th>
                            D级子项指定供应商
                        </th>
                        <th>
                            状态
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#Eval("ticName").ToString()%>
                    </td>
                    <td>
                        <%#Eval("ticDesc").ToString()%>
                    </td>
                    <td>
                        <asp:Image Width="40" Height="40" ImageUrl='<%#Eval("ticPictureUrl").ToString()%>'
                            runat="server" />
                    </td>
                    <td>
                        <%#Eval("num").ToString() %>
                    </td>
                    <td>
                        <%#Eval("c_name").ToString()%>
                    </td>
                    <td>
                        <%#Eval("d_name").ToString()%>
                    </td>
                    <td>
                        <%#Eval("ticRowStatus").ToString() == "0" || Eval("ticRowStatus").ToString()=="1" ? "正常" : "删除"%>
                    </td>
                    <td>
                        <asp:LinkButton runat="server" ID="lbnModify" OnClick="lbnModify_Click" CommandArgument='<%#Eval("TICID").ToString() %>'>
                            修改
                        </asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lbnDelete" OnClick="lbnDelete_Click" Visible='<%#Eval("ticRowStatus").ToString()=="2"?false:true %>'
                            CommandArgument='<%#Eval("TICID").ToString() %>' Enabled='<%#Eval("num").ToString()=="0"?true:false %>'>
                            删除
                        </asp:LinkButton>
                        <asp:LinkButton runat="server" ID="lbnRecover" OnClick="lbnRecover_Click" CommandArgument='<%#Eval("TICID").ToString() %>'
                            Visible='<%#Eval("ticRowStatus").ToString()=="2"?true:false %>'>
                            恢复
                        </asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <cc1:AspNetPager ID="AspNetPager1" Style="float: right" runat="server" PageSize="10"
            AlwaysShow="true" CssClass="paginator" CurrentPageButtonClass="cpb" FirstPageText="首页"
            PagingButtonSpacing="0" LastPageText="尾页" NextPageText="下一页" PrevPageText="上一页"
            OnPageChanged="AspNetPager1_pageChanged">
        </cc1:AspNetPager>
    </div>
    <div id="divAdd" style="display: none;">
        <div class="tc_header">
            <h2>
                编辑类别</h2>
            <a id="hideAdd">
                <img src="../images/chacha.png" width="13" height="13"></a>
        </div>
        <div class="tc_content">
            <div class="tanchu03" style="min-width: 200px; min-height: 80px">
                <table cellpadding="0" cellspacing="5" style="margin: 5px" class="queryResultTable">
                    <tr style="display: none;">
                        <th>
                            类别序号：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtId" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            类别名称：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtName" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            类别描述：
                        </th>
                        <td>
                            <input type="text" runat="server" id="txtDesc" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            图片地址：
                        </th>
                        <td>
                            <input type="file" name="txtFile" id="txtFile" />
                            <input type="button" value="上传" class="queryButton" id="btnUpload" style="margin-right: 10px;" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            图片预览:
                        </th>
                        <td>
                            <img runat="server" id="imgPrev" width="40" height="40" />
                            <asp:HiddenField runat="server" ID="hdfImg" />
                        </td>
                    </tr>
                    <tr>
                        <th>
                            C级子项指定供应商
                        </th>
                        <td>
                            <asp:DropDownList runat="server" ID="ddlClassC" Style="text-indent: 0px">
                                <asp:ListItem Text="无授权用户" Value=""></asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            D级子项指定供应商
                        </th>
                        <td>
                            <asp:DropDownList runat="server" ID="ddlClassD" Style="text-indent: 0px">
                                <asp:ListItem Text="无授权用户" Value=""> </asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
                <div style="text-align: center">
                    <asp:Button runat="server" ID="btnAdd" Text="确认" class="MaintenanceButton" OnClick="btnAdd_Click"
                        Style="background: #d91913; outline: none; border: none; color: White; padding: 5px 20px;" />
                </div>
            </div>
        </div>
    </div>
    <div id="divMsg" style="display: none;">
        <div class="tc_header">
            <h2>
                提示</h2>
            <a id="hideMsg">
                <img src="../images/chacha.png" width="13" height="13"></a>
        </div>
        <div class="tc_content">
            <div class="tanchu03" style="">
                <p id="msgContent">
                </p>
            </div>
        </div>
    </div>
    <div id="divUploading" style="display: none;">
        <div class="tc_header">
            <h2>
                提示</h2>
        </div>
        <div class="tc_content">
            <div class="tanchu03" style="">
                <p id="P1">
                    上传中，请稍候...
                </p>
            </div>
        </div>
    </div>
    <script type="text/javascript" src="../Scripts/ajaxFileUpload.js"></script>
    <script type="text/javascript" src="../Scripts/CatalogManage.js"></script>
</asp:Content>
